import configparser
import os.path
from utils.PathUtil import config_path


class IniUtil:

    def __init__(self):
        self.ini_path = os.path.join(config_path, "settings.ini")

    def read_settings_data(self):
        # 实例化一个对象
        config = configparser.ConfigParser()
        config.read(self.ini_path, encoding="utf-8")
        return config


if __name__ == '__main__':
    inidata = IniUtil()
    print(inidata.read_settings_data()["host"]["api_login_url"])
